Skip to main content

Are you on the right long-term path? Get a full financial assessment

Get a full financial assessment
← Back to M Definitions

Mean absolute error",

What Is Mean Absolute Error?

Mean absolute error (MAE) is a performance metric used in quantitative finance and data science to measure the average magnitude of errors between predicted values and actual observed outcomes. It falls under the broader category of performance metrics that help evaluate the accuracy of predictive models, particularly in fields like regression models and time series analysis. The mean absolute error provides a straightforward and intuitive understanding of the typical error size without considering the direction of the error, making it valuable for assessing forecast accuracy.66, 67, 68

History and Origin

The concept of quantifying forecasting and prediction errors has evolved alongside statistical and mathematical modeling. As models became more sophisticated, the need for robust evaluation metrics grew. Mean absolute error, along with other error measures like mean squared error (MSE), emerged as fundamental tools to assess model performance. Their development is intertwined with the progress in fields such as statistical modeling and optimization. For instance, the use of error metrics to compare competing models has a long history in forecasting, particularly in disciplines like meteorology and economics.64, 65 The choice between MAE and other metrics often depends on the underlying statistical distribution of errors, with MAE being optimal for errors following a Laplacian distribution.63

Key Takeaways

  • Mean absolute error (MAE) quantifies the average magnitude of prediction errors, providing a clear and interpretable measure of a model's accuracy.61, 62
  • It is calculated as the average of the absolute differences between predicted and actual values.59, 60
  • MAE is expressed in the same units as the original data, making it easy to understand the scale of the prediction errors.57, 58
  • Unlike some other metrics, MAE treats all errors equally, regardless of their size, and is less sensitive to outliers compared to squared error metrics.55, 56
  • A lower MAE value indicates a more accurate model, signifying that predictions are closer to the actual observations.53, 54

Formula and Calculation

The formula for calculating Mean Absolute Error involves summing the absolute differences between each predicted value and its corresponding actual value, then dividing by the number of data points.

The formula is expressed as:

MAE=1ni=1nyiy^iMAE = \frac{1}{n} \sum_{i=1}^{n} |y_i - \hat{y}_i|

Where:

  • (n) = the total number of observations or data points51, 52
  • (y_i) = the actual (true) value for observation (i)49, 50
  • (\hat{y}_i) = the predicted value for observation (i)47, 48
  • (|y_i - \hat{y}_i|) = the absolute difference between the actual and predicted values for observation (i) (also known as the absolute error)45, 46

This calculation ensures that both over-predictions and under-predictions contribute equally to the total error, as the absolute value removes any negative signs.44

Interpreting the Mean Absolute Error

Interpreting the Mean Absolute Error is straightforward due to its direct relationship with the units of the data. An MAE of, for example, $100 means that, on average, the model's predictions deviate from the true values by $100.42, 43 This direct interpretability makes MAE a valuable metric for communicating model performance to non-technical stakeholders in various aspects of data analysis and model evaluation. A lower MAE generally indicates better alignment between predicted and actual data, though what constitutes a "good" MAE value is highly dependent on the scale and context of the target variable.40, 41 For instance, an MAE of $10,000 might be acceptable for predicting house prices, but not for predicting stock returns measured in dollars per share.39

Hypothetical Example

Consider a financial analyst using a model to forecast the quarterly earnings per share (EPS) for a particular company. The actual EPS values and the model's predictions for five consecutive quarters are as follows:

QuarterActual EPS ($)Predicted EPS ($)Absolute Error ($)
Q12.502.60(
Q22.802.75(
Q32.702.85(
Q43.002.90(
Q53.203.10(

To calculate the Mean Absolute Error:

  1. Calculate the absolute error for each quarter: As shown in the "Absolute Error" column above.
  2. Sum the absolute errors:
    (0.10 + 0.05 + 0.15 + 0.10 + 0.10 = 0.50)
  3. Divide the sum by the number of observations ((n=5)):
    (MAE = \frac{0.50}{5} = 0.10)

In this hypothetical scenario, the Mean Absolute Error of $0.10 indicates that, on average, the model's quarterly EPS predictions deviate from the actual EPS by $0.10. This metric provides a clear understanding of the model's average prediction accuracy for earnings forecasts. This information can be crucial for decision-making related to investment strategies.

Practical Applications

Mean absolute error is widely applied across various quantitative fields, particularly in finance and economics, to evaluate the performance of predictive analytics.

  • Financial Forecasting: MAE is used to assess the accuracy of forecasts for stock prices, commodity prices, exchange rates, and earnings. For example, a model predicting the price of a stock might have an MAE of $0.50, meaning its predictions are off by half a dollar on average.37, 38 This helps analysts understand the typical error in their financial projections.
  • Risk Management: In risk management, MAE can evaluate the accuracy of models used to predict credit default probabilities or market volatility, providing insight into the average deviation from actual outcomes.
  • Supply Chain and Inventory Management: Businesses utilize MAE to assess the accuracy of demand forecasts, which directly impacts inventory levels and operational efficiency. A lower MAE in demand forecasting helps optimize supply chains and reduce holding costs.36
  • Economic Modeling: Economists employ MAE to evaluate the accuracy of macroeconomic models that forecast GDP growth, inflation, or unemployment rates. Analyzing forecast errors, including the mean absolute error, helps improve the reliability of economic predictions over time. A robust framework for analyzing forecast errors is essential for refining economic models.35
  • Machine Learning and Data Science: MAE is a common loss function for regression problems in machine learning and is frequently used to compare the effectiveness of different models.33, 34

Limitations and Criticisms

While Mean Absolute Error offers advantages in interpretability and robustness, it also has certain limitations. One significant criticism is that MAE does not provide information about the direction of the errors; it treats both overestimations and underestimations equally.31, 32 This means that a model consistently under-predicting by 10 units has the same MAE as a model that consistently over-predicting by 10 units, or even one that has a mix of over- and under-predictions whose absolute average is 10.

Another drawback is its lack of sensitivity to large errors compared to metrics that square the errors. While this makes MAE robust to outliers, it can be a disadvantage in applications where larger deviations are particularly undesirable and should be penalized more heavily.29, 30 For instance, in situations where extreme errors have disproportionately severe consequences, a metric that amplifies larger errors might be more appropriate. Furthermore, MAE is not differentiable at zero, which can present challenges when used as a loss function in certain optimization algorithms that rely on gradient-based methods.28 It is also a scale-dependent measure, meaning its value is directly influenced by the scale of the variable being predicted, which limits its utility for comparing model performance across datasets with different scales.27

Mean Absolute Error vs. Root Mean Squared Error (RMSE)

Mean absolute error is often compared with Root Mean Squared Error (RMSE) as both are widely used metrics for evaluating regression and forecasting models. The key distinction lies in how they treat errors of different magnitudes.

FeatureMean Absolute Error (MAE)Root Mean Squared Error (RMSE)
CalculationAverages the absolute differences between predictions and actuals.Averages the squared differences, then takes the square root.
Sensitivity to ErrorsTreats all individual errors equally.25, 26Gives higher weight to larger errors due to the squaring operation.23, 24
Outlier RobustnessMore robust to outliers.21, 22More sensitive to outliers, as squared large errors inflate the metric.19, 20
InterpretabilityEasily interpretable in the original units of the data.17, 18Less intuitive; expressed in the same units as the data but represents a "standard" error.16
OptimizationNot differentiable at zero, potentially complicating optimization.15Differentiable everywhere, making it suitable for gradient-based optimization.

The choice between MAE and RMSE often depends on the specific problem and the desired emphasis on errors. If large errors are particularly undesirable and should be penalized more significantly, RMSE might be preferred.13, 14 Conversely, if all errors are considered equally important, and interpretability in original units is key, MAE is often the more suitable choice.12 Both metrics are valuable, and practitioners sometimes use both to gain a comprehensive understanding of a model's performance.9, 10, 11

FAQs

What does a high Mean Absolute Error indicate?

A high Mean Absolute Error indicates that, on average, a model's predictions are significantly different from the actual values. This suggests lower forecast accuracy and that the model may not be performing well in capturing the underlying patterns in the data.7, 8

Can Mean Absolute Error be negative?

No, Mean Absolute Error cannot be negative. The calculation involves taking the absolute value of the differences between predicted and actual values, which ensures that all error contributions are positive or zero. As it is an average of these absolute values, MAE will always be zero or a positive number. A MAE of zero indicates perfect predictions.5, 6

Is Mean Absolute Error better than Mean Absolute Percentage Error (MAPE)?

MAE and Mean Absolute Percentage Error (MAPE) serve different purposes. MAE provides an absolute measure of error in the original units of the data, which is easy to interpret. MAPE, on the other hand, expresses error as a percentage of the actual value, making it scale-independent and useful for comparing forecasts across different datasets or series with varying scales.3, 4 However, MAPE can become undefined or excessively large when actual values are zero or very close to zero, a limitation not present with MAE.1, 2 The choice between them depends on the specific context and the characteristics of the data.

How is Mean Absolute Error used in portfolio management?

In portfolio theory and management, Mean Absolute Error can be used to evaluate the accuracy of models that forecast asset prices, returns, or portfolio values. By quantifying the average deviation of forecasted values from actual outcomes, MAE helps assess the reliability of investment models and informs adjustments to investment strategies or risk management approaches. For instance, it can help evaluate the effectiveness of models predicting future stock dividends or bond yields.

AI Financial Advisor

Get personalized investment advice

  • AI-powered portfolio analysis
  • Smart rebalancing recommendations
  • Risk assessment & management
  • Tax-efficient strategies

Used by 30,000+ investors